package com.zhanqiao.service;

import com.zhanqiao.Dao.OnSaleDao;
import com.zhanqiao.domain.ArticleBean;
import com.zhanqiao.domain.ProductBean;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

public class OnSaleService implements ArticleService {
    @Override
    public List<ArticleBean> articleService() {
        return null;
    }

    public int articleService(String pname, Integer pgetprice, Integer psaleprice, String pduetime, Integer pcount, String tag) {
        ProductBean productBean = new ProductBean();
        productBean.setPname(pname);
        productBean.setPgetprice(pgetprice);
        productBean.setPsaleprice(psaleprice);
        productBean.setPduetime(pduetime);
        productBean.setPcount(pcount);
        OnSaleDao onSaleDao = new OnSaleDao();
        int i = onSaleDao.insertArticle(productBean, tag);
        return i;
    }


}
